let multer = require('multer');
var user = require('../controllers/userController')
var express = require('express');
var router = express.Router();
const { application } = require('express');
const dbConfig = require('../utils/dbConfig');
let upload = multer({ dest: './public/uploads/' }).single('file')
/* GET users listing. */
router.post('/sendCode', user.sendCode);
router.post('/codePhoneLogin', user.codePhoneLogin);
router.post('/login', user.login);
router.post('/editUserInfo', user.editUserInfo);
router.post('/setPassword', user.setPassword);
router.post('/setAddress', user.setAddress);
router.post('/editAvator', upload, user.editAvator);

module.exports = router;
